package model

type ReleaseType int

// 发布方式，0自主 1强制 2 静默
const (
	OtaAutonomous ReleaseType = 0
	OtaMandatory  ReleaseType = 1
	OtaSilence    ReleaseType = 2
)
const (
	OtaCancel = iota
	OtaAgree
)

const (
	OtaInProgress = iota
	OtaSuccess
	OtaFailure
	OtaAbolishment
)

type OtaCheckVersionRequest struct {
	SNCode  string `json:"sn_code" binding:"required"`
	Version string `json:"version"`
}

type OtaCheckVersionResponse struct {
	Version string `json:"version"`
	//发布方式
	ReleaseType int   `json:"release_type"`
	TacticsId   int64 `json:"tactics_id" `
}

type OtaUpgradeRequest struct {
	SNCode    string `json:"sn_code" binding:"required"`
	Status    *int   `json:"status" binding:"required"` // 升级确认状态（0:确认,1:取消）
	TacticsId int64  `json:"tactics_id" binding:"required"`
}
